import React, {Component} from 'react';
import { Link } from 'react-router';

import { Menu, Icon } from 'antd';
const SubMenu = Menu.SubMenu;
const MenuItemGroup = Menu.ItemGroup;

class Header extends Component {
    constructor(props) {
        super(props);
        this.state = {
            current: 'mail'
        };
    }
    handleClick(e) {
        this.setState({
            current: e.key,
        });
    }
    
    render() {
        return (
            <Menu onClick={this.handleClick.bind(this) }
                selectedKeys={[this.state.current]}
                mode="horizontal">

                <Menu.Item key="a">
                      <Link to={{ pathname: '/movies'}} ><Icon type="caret-circle-right" />视频列表</Link>
                </Menu.Item>
                <Menu.Item key="b">
                     <Link to={{ pathname: '/books'}} ><Icon type="book" />书籍列表</Link>
                </Menu.Item>
            </Menu>
        );
    }
}

export default Header;